<?php $this->load->view('vheader')?>
<div class="table-responsive">
<table id="sample-table-2" class="table table-striped table-bordered table-hover">
<thead>
   <tr>
      <th class="center" width="5%">
		#
      </th>
      <th class="center" class="center" width="10%">Tanggal</th>
      <th class="center" width="10%">No SO</th>
      <th class="center hidden-480" width="10%">Total</th>
      <th class="center hidden-480" width="10%">Diskon</th>
      <th class="center hidden-480" width="10%">Netto</th>
      <th class="center hidden-480" width="10%">Ppn</th>
      <th class="center hidden-480" width="10%">Netto+Ppn</th>
      <th class="center hidden-480" width="10%">Status</th>
      <th></th>
   </tr>
</thead>
<tbody>
<?php
if(!empty($nontender)){

$nmr = 1;
foreach($nontender as $row){
?>
   <tr>
      <td class="center">
      <?php echo $nmr; ?>
      </td>
      <td class="center">
      <?php echo date("d-m-Y",strtotime($row->so_date));?>
      </td>
      <td class="center">
      <?php echo $row->saleid;?>
      </td>
      <td class="hidden-480" align="right">
      <?php echo number_format($row->total_order,0,'','.');?>&nbsp;
      </td>
      <td class="hidden-480" align="right">
      <?php echo number_format($row->diskon,0,'','.');?>&nbsp;
      </td>
      <td class="hidden-480" align="right">
      <?php echo number_format($row->netto,0,'','.');?>&nbsp;
      </td>
      <td class="hidden-480" align="right">
      <?php echo number_format($row->ppn,0,'','.');?>&nbsp;
      </td>
      <td class="hidden-480" align="right">
      <?php echo number_format($row->nettoppn,0,'','.');?>&nbsp;
      </td>
      <td class="hidden-480" class="center">
      	 <?php
		 if($row->status == '1'){
			 $status = "Dipesan";
		 }else if($row->status == '2'){
			 $status = "Dikirim";
		 }else if($row->status == '3'){
			 $status = "Terkirim";
		 }
		 ?>
         <span class="label label-sm label-warning"><?php echo $status; ?></span>
      </td>
      <td class="center">
         <div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">
            <a id="show-option" title="slide down on show" class="blue" 
            href="<?php echo site_url()?>/transaksi/status_so/detail_so/<?php echo $row->saleid;?>">
            <i class="icon-zoom-in bigger-120"></i>
            </a>
            <a id="show-option" title="slide down on show" class="blue" onclick="return batal(<?php echo $row->saleid;?>)" 
            href="<?php echo site_url()?>/transaksi/status_so/batal/<?php echo $row->saleid;?>">
            <i class="icon-minus-sign"></i>
            </a>
            <a id="show-option" title="slide down on show" href="<?php echo site_url()?>/transaksi/sales_order_out/tampil/<?php echo $row->saleid;?>">
            <i class="icon-shopping-cart bigger-120"></i>	
            </a>
         </div>
         <div class="visible-xs visible-sm hidden-md hidden-lg">
            <div class="inline position-relative">
               <button class="btn btn-minier btn-yellow dropdown-toggle" data-toggle="dropdown">
               <i class="icon-caret-down icon-only bigger-120"></i>
               </button>
               <ul class="dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close">
                  <li>
                     <a href="<?php echo site_url()?>/transaksi/status_so/detail_so/<?php echo $row->saleid;?>" 
                     class="tooltip-info" data-rel="tooltip" title="View">
                     <span class="blue">
                     <i class="icon-zoom-in bigger-120"></i>
                     </span>
                     </a>
                  </li>
                  <li>
                     <a  href="<?php echo site_url()?>/transaksi/status_so/batal/<?php echo $row->saleid;?>" 
                     class="tooltip-info" data-rel="tooltip" title="View">
                     <span class="blue">
                     <i class="icon-minus-sign bigger-120"></i>
                     </span>
                     </a>
                  </li>
                  <li>
                     <a href="<?php echo site_url()?>/transaksi/sales_order_out/tampil/<?php echo $row->saleid;?>" 
                     class="tooltip-info" data-rel="tooltip" title="Pengiriman">
                     <span class="blue">
                     <i class="icon-shopping-cart bigger-120"></i>
                     </span>
                     </a>
                  </li>
               </ul>
            </div>
         </div>
      </td>
   </tr>
<?Php 
$nmr++;
} 
} 
?>
</tbody>
</div>
<script>
function batal(x){
	var agree = confirm("Anda Yakin Ingin Mengapus No SO Ini : "+x);
	if(agree){
		return true;
	}else{
		return false;
	}
}
</script>
<?php $this->load->view('vfooter')?>